/**
 * Copyright (c) 2013-2022, Alibaba Group Holding Limited;
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * </p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.aliyun.polardbx.binlog;

import java.util.HashSet;
import java.util.Set;

/**
 * @author yudong
 * @since 2024/1/18 14:12
 **/
public class ServerVariables {

    public static Set<String> variables = new HashSet<>();

    static {
        variables.add("assigned_dn_ip");
        variables.add("sigar_enabled");
        variables.add("latest_server_address_persist_file");
        variables.add("latest_server_address_flush_interval");
        variables.add("force_reset_enable");
        variables.add("storage_persist_enabled");
        variables.add("storage_persist_txn_entity_enabled");
        variables.add("storage_persist_mode");
        variables.add("storage_persist_all_threshold");
        variables.add("storage_persist_new_threshold");
        variables.add("storage_persist_check_interval_mills");
        variables.add("storage_persist_txn_threshold");
        variables.add("storage_persist_txnitem_threshold");
        variables.add("storage_persist_base_path");
        variables.add("storage_persist_delete_mode");
        variables.add("storage_persist_unit_count");
        variables.add("storage_clean_worker_count");
        variables.add("storage_clean_buffer_size");
        variables.add("storage_parallel_restore_enabled");
        variables.add("storage_parallel_restore_parallelism");
        variables.add("storage_parallel_restore_batch_size");
        variables.add("storage_parallel_restore_max_event_size");
        variables.add("metadb_scan_switch");
        variables.add("metadb_scan_interval_seconds");
        variables.add("datasource_check_valid_timeout_sec");
        variables.add("binlog_txn_stream_packet_mode");
        variables.add("binlog_txn_stream_client_async_enabled");
        variables.add("binlog_txn_stream_client_receive_queue_size");
        variables.add("binlog_txn_stream_flow_control_window_size");
        variables.add("binlog_dir_path");
        variables.add("binlog_disk_max_size_mb");
        variables.add("binlog_file_size");
        variables.add("binlog_file_seek_buffer_size");
        variables.add("binlog_file_seek_last_tso_mode");
        variables.add("binlog_write_dry_run_enabled");
        variables.add("binlog_write_dry_run_mode");
        variables.add("binlog_write_rows_query_event_enabled");
        variables.add("binlog_write_check_rows_query_event");
        variables.add("binlog_write_check_server_id");
        variables.add("binlog_write_check_server_id_target_value");
        variables.add("binlog_write_check_tso");
        variables.add("binlog_write_buffer_size");
        variables.add("binlog_write_buffer_direct_enabled");
        variables.add("binlog_write_flush_policy");
        variables.add("binlog_write_flush_interval");
        variables.add("binlog_write_heartbeat_interval");
        variables.add("binlog_write_heartbeat_as_txn");
        variables.add("binlog_write_tableid_base_value");
        variables.add("binlog_parallel_build_enabled");
        variables.add("binlog_parallel_build_parallelism");
        variables.add("binlog_parallel_build_with_batch");
        variables.add("binlog_parallel_build_ring_buffer_size");
        variables.add("binlog_parallel_build_max_slot_size");
        variables.add("binlog_parallel_build_max_slot_payload_size");
        variables.add("binlog_sync_read_buffer_size");
        variables.add("binlog_sync_packet_size");
        variables.add("binlog_sync_client_async_enabled");
        variables.add("binlog_sync_client_receive_queue_size");
        variables.add("binlog_sync_flow_control_window_size");
        variables.add("binlog_sync_event_split_mode");
        variables.add("binlog_sync_inject_trouble_enabled");
        variables.add("binlog_sync_check_file_status_interval_second");
        variables.add("binlog_dump_packet_size");
        variables.add("binlog_dump_read_buffer_size");
        variables.add("binlog_dump_master_heartbeat_period");
        variables.add("binlog_dump_m_event_checksum_alg");
        variables.add("binlog_dump_back_pressure_sleep_time_us");
        variables.add("binlog_dump_wait_cursor_ready_times_limit");
        variables.add("binlog_dump_wait_cursor_ready_retry_interval_second");
        variables.add("binlog_dump_test_streaming_consume_enabled");
        variables.add("binlog_dump_force_streaming_consume_enabled");
        variables.add("binlog_dump_download_path");
        variables.add("binlog_dump_download_first_mode");
        variables.add("binlog_dump_download_window_size");
        variables.add("binlog_dump_download_error_retry_times");
        variables.add("binlog_dump_download_max_wait_seconds");
        variables.add("binlog_backup_type");
        variables.add("binlog_backup_file_preserve_days");
        variables.add("binlog_backup_purged_record_preserve_days");
        variables.add("binlog_backup_upload_mode");
        variables.add("binlog_backup_upload_buffer_size");
        variables.add("binlog_backup_upload_max_thread_num");
        variables.add("binlog_backup_upload_multi_append_threshold");
        variables.add("binlog_backup_upload_part_size");
        variables.add("binlog_backup_upload_wait_data_timeout_ms");
        variables.add("binlog_backup_download_mode");
        variables.add("binlog_backup_download_part_size");
        variables.add("binlog_backup_download_max_thread_num");
        variables.add("binlog_backup_download_last_file_count");
        variables.add("binlog_backup_force_download_enabled");
        variables.add("binlog_backup_download_link_preserve_seconds");
        variables.add("binlog_purge_check_interval_minute");
        variables.add("binlog_purge_disk_use_ratio");
        variables.add("binlog_purge_enabled");
        variables.add("binlog_recover_mode_with_dumper_slave");
        variables.add("binlog_recover_tso_overwrite_config");
        variables.add("daemon_heartbeat_interval_ms");
        variables.add("daemon_watch_cluster_interval_ms");
        variables.add("daemon_watch_cluster_heartbeat_timeout_ms");
        variables.add("daemon_watch_cluster_wait_start_timeout_ms");
        variables.add("daemon_watch_work_process_interval_ms");
        variables.add("daemon_watch_work_process_heartbeat_timeout_ms");
        variables.add("daemon_watch_work_process_blacklist");
        variables.add("daemon_watch_history_resource_interval_minute");
        variables.add("daemon_watch_replica_in_binlog_cluster_enabled");
        variables.add("daemon_tso_heartbeat_interval_ms");
        variables.add("daemon_tso_heartbeat_self_adaption_enabled");
        variables.add("daemon_tso_heartbeat_self_adaption_target_interval");
        variables.add("daemon_tso_heartbeat_self_adaption_eps_threshold");
        variables.add("daemon_force_refresh_topology_interval");
        variables.add("daemon_support_refresh_topology_only_daemon_down");
        variables.add("daemon_wait_task_start_timeout_second");
        variables.add("daemon_wait_task_stop_timeout_second");
        variables.add("daemon_wait_clean_binlog_timeout_second");
        variables.add("daemon_dn_health_checker_switch");
        variables.add("daemon_dn_health_checker_interval");
        variables.add("daemon_dn_health_checker_connection_timeout_second");
        variables.add("daemon_dn_health_checker_sla_limit_second");
        variables.add("daemon_dn_health_checker_error_inject");
        variables.add("daemon_dn_health_checker_retry_num");
        variables.add("daemon_auto_flush_log_test");
        variables.add("topology_node_minsize");
        variables.add("topology_work_process_heartbeat_interval_ms");
        variables.add("topology_use_relay_task_threshold_with_dn_num");
        variables.add("topology_resource_use_ratio");
        variables.add("topology_resource_dumper_weight");
        variables.add("topology_resource_dumper_slave_max_mem");
        variables.add("topology_resource_task_weight");
        variables.add("topology_repair_storage_with_scale_enabled");
        variables.add("topology_recover_tso_type");
        variables.add("topology_recover_tso_time_limit");
        variables.add("topology_recover_tso_binlog_num_limit");
        variables.add("topology_force_use_recover_tso_enabled");
        variables.add("columnar_process_heartbeat_timeout_ms");
        variables.add("task_engine_auto_start");
        variables.add("task_merge_xa_without_tso");
        variables.add("task_merge_dry_run");
        variables.add("task_merge_dry_run_mode");
        variables.add("task_merge_group_unit_size");
        variables.add("task_merge_group_queue_size");
        variables.add("task_merge_group_max_level");
        variables.add("task_merge_source_queue_size");
        variables.add("task_merge_source_queue_max_total_size");
        variables.add("task_merge_force_complete_heartbeat_window_time_limit");
        variables.add("task_merge_check_heartbeat_window_enabled");
        variables.add("task_transmit_dry_run");
        variables.add("task_transmit_dry_run_mode");
        variables.add("task_transmit_chunk_mode");
        variables.add("task_transmit_chunk_item_size");
        variables.add("task_transmit_max_message_size");
        variables.add("task_transmit_queue_size");
        variables.add("task_transmit_dumping_queue_size");
        variables.add("task_collect_merge_stage_parallelism");
        variables.add("task_collect_build_packet_size_limit");
        variables.add("task_collect_queue_size");
        variables.add("task_extract_log_trans");
        variables.add("task_extract_log_trans_detail");
        variables.add("task_extract_log_event");
        variables.add("task_extract_remove_hints_in_ddl_sql");
        variables.add("task_extract_skip_duplicate_txn_key");
        variables.add("task_extract_filter_logic_table_blacklist");
        variables.add("task_extract_filter_logic_db_blacklist");
        variables.add("task_extract_filter_physical_table_blacklist");
        variables.add("task_extract_filter_trans_blacklist");
        variables.add("task_extract_filter_trans_threshold");
        variables.add("task_extract_disorder_trace_id_allowed");
        variables.add("task_extract_sort_hold_size");
        variables.add("task_extract_transaction_group_size");
        variables.add("task_extract_watch_memory_leak_enabled");
        variables.add("task_extract_rebuild_data_log");
        variables.add("task_reformat_column_type_enabled");
        variables.add("task_reformat_attach_private_ddl_enabled");
        variables.add("task_reformat_attach_drds_hidden_pk_enabled");
        variables.add("task_reformat_ignore_mismatched_column_error");
        variables.add("task_reformat_event_force_enabled");
        variables.add("task_reformat_ddl_algorithm_blacklist");
        variables.add("task_dump_offline_binlog_forced");
        variables.add("task_dump_offline_binlog_recall_days_limit");
        variables.add("task_dump_offline_binlog_prefer_host_instances");
        variables.add("task_dump_offline_binlog_in_download_mode");
        variables.add("task_dump_offline_binlog_download_dir");
        variables.add("task_dump_offline_binlog_download_thread_init_num");
        variables.add("task_dump_offline_binlog_download_thread_max_num");
        variables.add("task_dump_offline_binlog_download_disk_limit_per_dn");
        variables.add("task_dump_offline_binlog_download_disk_limit_total");
        variables.add("task_dump_offline_binlog_cache_mode");
        variables.add("task_dump_offline_binlog_cache_unit_size");
        variables.add("task_dump_offline_binlog_cache_size_limit");
        variables.add("task_dump_same_region_storage_binlog");
        variables.add("task_recover_check_previous_dn_change");
        variables.add("task_recover_search_tso_in_quick_mode");
        variables.add("task_recover_force_quick_search_when_loss_backup");
        variables.add("task_recover_search_tso_with_v1_algorithm");
        variables.add("task_reformat_no_foreign_key_check");
        variables.add("alarm_nodata_threshold_second");
        variables.add("alarm_delay_threshold_second");
        variables.add("alarm_report_alarm_event_enabled");
        variables.add("alarm_latest_consume_time_ms");
        variables.add("alarm_check_consumer_interval_ms");
        variables.add("alarm_fatal_threshold_ms");
        variables.add("meta_recover_rollback_mode");
        variables.add("meta_recover_force_use_snapshot_exactly_mode");
        variables.add("meta_retrieve_instant_create_table_modes");
        variables.add("meta_build_check_consistency_enabled");
        variables.add("meta_build_log_table_meta_detail_enabled");
        variables.add("meta_build_semi_snapshot_enabled");
        variables.add("meta_build_semi_snapshot_preserve_hours");
        variables.add("meta_build_semi_snapshot_check_delta_interval_sec");
        variables.add("meta_build_apply_from_history_first");
        variables.add("meta_build_full_snapshot_threshold");
        variables.add("meta_build_snapshot_retry_times");
        variables.add("meta_build_full_snapshot_check_interval_sec");
        variables.add("meta_build_record_sql_with_exists_enabled");
        variables.add("meta_build_physical_ddl_sql_blacklist_regex");
        variables.add("meta_build_logic_ddl_db_blacklist");
        variables.add("meta_build_logic_ddl_table_blacklist");
        variables.add("meta_build_logic_ddl_tso_blacklist");
        variables.add("meta_build_share_topology_enabled");
        variables.add("meta_build_share_topology_with_intern");
        variables.add("meta_build_ignore_apply_error");
        variables.add("meta_build_snapshot_error_inject");
        variables.add("meta_build_record_ignored_ddl_enabled");
        variables.add("meta_alarm_logic_ddl_count_threshold");
        variables.add("meta_alarm_physical_ddl_count_threshold");
        variables.add("meta_purge_physical_ddl_threshold");
        variables.add("meta_purge_mark_ddl_threshold");
        variables.add("meta_purge_logic_ddl_soft_delete_enabled");
        variables.add("meta_persist_base_path");
        variables.add("meta_persist_enabled");
        variables.add("meta_cache_compare_result_enabled");
        variables.add("meta_cache_table_meta_max_size");
        variables.add("meta_cache_table_meat_expire_time_minutes");
        variables.add("binlogx_rocksdb_base_path");
        variables.add("binlogx_auto_init");
        variables.add("binlogx_stream_group_name");
        variables.add("binlogx_stream_count");
        variables.add("binlogx_dir_path_prefix");
        variables.add("binlogx_wait_latest_tso_timeout_second");
        variables.add("binlogx_schedule_dispatcher_count_per_node");
        variables.add("binlogx_schedule_dispatcher_memory_unit");
        variables.add("binlogx_schedule_dispatcher_memory_min");
        variables.add("binlogx_schedule_dispatcher_rocksdb_ratio");
        variables.add("binlogx_transmit_relay_engine_type");
        variables.add("binlogx_transmit_relay_file_max_size");
        variables.add("binlogx_transmit_read_batch_item_size");
        variables.add("binlogx_transmit_read_batch_byte_size");
        variables.add("binlogx_transmit_read_file_buffer_size");
        variables.add("binlogx_transmit_read_log_detail_enabled");
        variables.add("binlogx_transmit_write_batch_size");
        variables.add("binlogx_transmit_write_parallelism");
        variables.add("binlogx_transmit_write_queue_size");
        variables.add("binlogx_transmit_write_file_buffer_size");
        variables.add("binlogx_transmit_write_file_buffer_use_direct_mem");
        variables.add("binlogx_transmit_write_file_flush_interval_ms");
        variables.add("binlogx_transmit_write_slowdown_threshold");
        variables.add("binlogx_transmit_write_slowdown_speed");
        variables.add("binlogx_transmit_write_stop_threshold");
        variables.add("binlogx_transmit_write_log_detail_enabled");
        variables.add("binlogx_transmit_hash_level");
        variables.add("binlogx_record_level_hash_db_list");
        variables.add("binlogx_record_level_hash_table_list");
        variables.add("binlogx_db_level_hash_db_list");
        variables.add("binlogx_db_level_hash_table_list");
        variables.add("binlogx_table_level_hash_db_list");
        variables.add("binlogx_table_level_hash_table_list");
        variables.add("binlogx_table_level_hash_table_list_regex");
        variables.add("binlogx_clean_old_version_binlog_enabled");
        variables.add("binlogx_clean_relay_data_enabled");
        variables.add("binlogx_clean_relay_data_interval_minute");
        variables.add("binlogx_txn_stream_flow_control_window_max_size");
        variables.add("binlogx_file_seek_buffer_max_total_size");
        variables.add("binlogx_kway_source_queue_size");

        variables.add("rpl_task_support_running_check");
        variables.add("rpl_single_task_memory_when_distribute");
        variables.add("rpl_random_compare_all");
        variables.add("rpl_rocksdb_deserialize_parallelism");
        variables.add("rpl_validation_per_db_parallelism");
        variables.add("rpl_validation_chunk_size");
        variables.add("rpl_default_ignore_db_list");
        variables.add("rpl_default_sql_mode");
        variables.add("rpl_pool_cn_black_ip_list");
        variables.add("rpl_task_keep_alive_interval_seconds");
        variables.add("rpl_filter_table_error");
        variables.add("rpl_persist_schema_meta_enabled");
        variables.add("rpl_table_meta_max_cache_size");
        variables.add("rpl_table_meta_expire_time_minutes");
        variables.add("rpl_state_metrics_flush_interval_second");
        variables.add("rpl_ddl_retry_interval_mills");
        variables.add("rpl_ddl_retry_max_count");
        variables.add("rpl_ddl_wait_align_interval_mills");
        variables.add("rpl_ddl_apply_columnar_enabled");
        variables.add("rpl_delay_alarm_threshold_second");
        variables.add("rpl_ddl_parse_error_process_mode");
        variables.add("rpl_error_sql_truncate_length");
        variables.add("rpl_set_max_statement_time_option");
        variables.add("rpl_async_ddl_enabled");
        variables.add("rpl_async_ddl_threshold_in_second");
        variables.add("rpl_parallel_schema_apply_enabled");
        variables.add("rpl_parallel_schema_channel_enabled");
        variables.add("rpl_parallel_schema_channel_parallelism");
        variables.add("rpl_parallel_schema_apply_batch_size");
        variables.add("rpl_parallel_table_apply_enabled");
        variables.add("rpl_apply_use_cached_thread_pool_enabled");
        variables.add("rpl_default_memory");
        variables.add("rpl_full_valid_max_batch_rows_count");
        variables.add("rpl_full_valid_max_batch_size");
        variables.add("rpl_full_valid_max_sample_percentage");
        variables.add("rpl_full_valid_max_sample_rows_count");
        variables.add("rpl_full_valid_max_persist_rows_count");
        variables.add("rpl_full_valid_runner_thread_pool_core_size");
        variables.add("rpl_full_valid_runner_thread_pool_max_size");
        variables.add("rpl_full_valid_runner_thread_pool_keep_alive_time_seconds");
        variables.add("rpl_full_valid_runner_thread_pool_queue_size");
        variables.add("rpl_full_valid_cn_conn_pool_count");
        variables.add("rpl_full_valid_check_detail_fetch_size");
        variables.add("rpl_extractor_ddl_log_open");
    }
}
